﻿using Shinva.LADModel.Abstractions;
using Shinva.Variables.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shinva.LADModel.Models
{
   public class Connector<T> where T : IPlcMember
    {

        public string Name { get; set; } = "Connector";
        public T From { get; set; }
        //标记来源的节点
        public IGraphNode FromNode { get; set; }

        private T _to;
        public T To
        {
            get
            {
                //这里就会修改图元中en的value值为前一个图元的eno值
                _to.Value = From.Value; 
                return _to;
            }
            set
            {
                _to = value;
            }
        }
        //标记去向的节点
        public IGraphNode ToNode { get; set; }


    }

}
